/**
 * user模块接口列表
 */

import base from './base'; // 导入接口域名列表
import axios from 'axios';
import qs from 'qs'; // 根据需求是否导入qs模块

//登录
export const login = ({ name, password,googlekey }) => {
  const data = {
    name,
    password,
    googlekey
  };
  return axios.post(`${base.base}/login`,
    qs.stringify(data)
  )
};

export const getUserInfo = (token) => {
  const data = {
    token
  };
  return axios.post(`${base.base}/get_info`,
    qs.stringify(data)
  )
  // "data": {
  //   "level": "admin",
  //     "user": "huang"
  // }
};


export default login;


